from selenium import webdriver
from selenium.webdriver.common.by import By
import time
from time import  sleep
# 创建浏览器驱动对象
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.wait import WebDriverWait

driver = webdriver.Chrome()
# 加载web页面
driver.get("http://121.43.169.97:8848/pageA.html")

# 放大浏览器
driver.maximize_window()
# 需求：使用‘注册A.html’页面，完成对城市的下拉框的操作
# 1).选择‘广州’
driver.find_element_by_css_selector("[value='gz']").click()
sleep(2)
# 2).暂停2秒，选择‘上海’
driver.find_element_by_css_selector("[value='sh']").click()
sleep(2)
# 3).暂停2秒，选择‘北京
driver.find_element_by_css_selector("[value='bj']").click()
sleep(2)
driver.quit()